package com.thm.tfast.modules.sys.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 资源信息
 * </p>
 *
 * @author THM
 * @since 2022-10-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("sys_resource")
@ApiModel(value="SysResource对象", description="资源信息")
public class SysResource implements Serializable {

    private static final long serialVersionUID = -6249220272112893543L;

    @ApiModelProperty(value = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;


    @ApiModelProperty(value = "资源名称")
    private String name;

    @ApiModelProperty(value = "资源类型ID")
    private Long categoryId;

    @ApiModelProperty(value = "请求统一前缀")
    private String prefix;

    @ApiModelProperty(value = "请求路径")
    private String url;

    @ApiModelProperty(value = "请求方式")
    private String method;

    @ApiModelProperty(value = "描述")
    private String description;

    @ApiModelProperty(value = "类型 1-系统资源 2-业务资源")
    private Integer type;

    @ApiModelProperty(value = "是否需要权限访问 0-不需要  1-需要")
    private Integer hasPermission;

    @ApiModelProperty(value = "权限ID")
    private Integer permissionId;

    @ApiModelProperty(value = "权限标识")
    @TableField(exist = false)
    private String permission;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(locale="zh", timezone="GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    @ApiModelProperty(value = "创建用户")
    private Long createUser;

    @ApiModelProperty(value = "修改时间")
    @JsonFormat(locale="zh", timezone="GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @ApiModelProperty(value = "修改用户")
    private Long updateUser;


}
